package com.schpro.webexperiment.model;

import com.schpro.webexperiment.dataobject.WxExp;
import java.util.Date;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

/**
 * TODO
 *
 * @author lss
 * @date 2019-02-27, Wed
 */
@Getter
@Setter
public class Experiment extends BaseModel {


  /**
   * 描述
   */
  private String description;


  /**
   * 父id
   */
  private String refId;

  /**
   * 密码算法 -> 单表置换密码
   */
  private List<Exercise> children;


  /**
   * 创建时间
   */
  private Date gmtCreated;

  /**
   * 最后修改时间
   */
  private Date gmtModified;


  public Experiment(WxExp exp) {
    this.setLevel(BaseModel.LEVEL_EXP);
    BeanUtils.copyProperties(exp, this);
  }

  public Experiment() {
    this.setLevel(BaseModel.LEVEL_EXP);
  }
}
